<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="i1">
<input type="button" id="b1" value="按钮">
<div id="d1"></div>
<!--引入jq框架-->
<script src="../js/jquery-1.4.2.js"></script>
<script>
    //给按钮添加点击事件
    $("#b1").click(function () {
        // alert("按钮点击了");
        //把文本框的值取出 给到div ·+·
        $("#d1").text($("#i1").val());

        // let d1 = document.getElementById("d1");
        // let i1 = document.getElementById("i1");
        // d1.innerText=i1.value;
    });
</script>
</body>
</html>